﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 客户档案表基础输入参数
/// </summary>
public class CustomerBaseInput
{
    /// <summary>
    /// 客户名称
    /// </summary>
    public virtual string CusName { get; set; }

    /// <summary>
    /// 客户类型
    /// </summary>
    public virtual int Type { get; set; }

    /// <summary>
    /// 收款数量
    /// </summary>
    public int Quantity { get; set; } = 1;

    /// <summary>
    /// 金额
    /// </summary>
    public virtual double Money { get; set; }

    /// <summary>
    /// 资产额
    /// </summary>
    public double? PropertyMoney { get; set; }

    /// <summary>
    /// 是否收款
    /// </summary>
    public virtual bool IsCollected { get; set; }

    /// <summary>
    /// 是否出报告
    /// </summary>
    public virtual bool IsReport { get; set; }

    /// <summary>
    /// 收款日期
    /// </summary>
    public virtual DateTime? CollectedTime { get; set; }

    /// <summary>
    /// 出报告日期
    /// </summary>
    public virtual DateTime? ReportTime { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }

    /// <summary>
    /// 凭证备注
    /// </summary>
    public virtual string? VoucherRemark { get; set; }



    /// <summary>
    /// 渠道对接
    /// </summary>
    public virtual long? SourceChanne { get; set; }

    /// <summary>
    /// 渠道名称
    /// </summary>
    public virtual string? SourceChanneName { get; set; }

    /// <summary>
    /// 凭证图片
    /// </summary>
    public virtual string? VoucherImg { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public virtual DateTime? CreateTime { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public virtual DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 创建者Id
    /// </summary>
    public virtual long? CreateUserId { get; set; }

    /// <summary>
    /// 创建者姓名
    /// </summary>
    public virtual string? CreateUserName { get; set; }

    /// <summary>
    /// 修改者Id
    /// </summary>
    public virtual long? UpdateUserId { get; set; }

    /// <summary>
    /// 修改者姓名
    /// </summary>
    public virtual string? UpdateUserName { get; set; }

    /// <summary>
    /// 软删除
    /// </summary>
    public virtual bool IsDelete { get; set; }

}

/// <summary>
/// 客户档案表分页查询输入参数
/// </summary>
public class PageCustomerInput : BasePageInput
{
    /// <summary>
    /// 关键字查询
    /// </summary>
    public string? SearchKey { get; set; }

    /// <summary>
    /// 客户名称
    /// </summary>
    public string? CusName { get; set; }

    /// <summary>
    /// 客户类型
    /// </summary>
    public int? Type { get; set; }

    /// <summary>
    /// 收款数量
    /// </summary>
    public int Quantity { get; set; } = 1;

    /// <summary>
    /// 金额
    /// </summary>
    public double? Money { get; set; }

    /// <summary>
    /// 资产额
    /// </summary>
    public double? PropertyMoney { get; set; }

    /// <summary>
    /// 是否收款
    /// </summary>
    public int IsCollected { get; set; } = -1;

    /// <summary>
    /// 是否出报告
    /// </summary>
    public int IsReport { get; set; } = -1;

    /// <summary>
    /// 收款日期
    /// </summary>
    public DateTime? CollectedTime { get; set; }

    /// <summary>
    /// 收款日期范围
    /// </summary>
    public DateTime?[] CollectedTimeRange { get; set; }
    /// <summary>
    /// 出报告日期
    /// </summary>
    public DateTime? ReportTime { get; set; }

    /// <summary>
    /// 出报告日期范围
    /// </summary>
    public DateTime?[] ReportTimeRange { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 凭证备注
    /// </summary>
    public string? VoucherRemark { get; set; }

    /// <summary>
    /// 渠道对接
    /// </summary>
    public long? SourceChanne { get; set; }

    /// <summary>
    /// 渠道名称
    /// </summary>
    public string? SourceChanneName { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public long? CreateUserId { get; set; }

    /// <summary>
    /// 部门Id
    /// </summary>
    public long? OrgId { get; set; }

}

/// <summary>
/// 客户档案表增加输入参数
/// </summary>
public class AddCustomerInput : CustomerBaseInput
{
    /// <summary>
    /// 客户名称
    /// </summary>
    [Required(ErrorMessage = "客户名称不能为空")]
    public override string CusName { get; set; }

    /// <summary>
    /// 客户类型
    /// </summary>
    [Required(ErrorMessage = "客户类型不能为空")]
    public override int Type { get; set; }

    /// <summary>
    /// 金额
    /// </summary>
    [Required(ErrorMessage = "金额不能为空")]
    public override double Money { get; set; }

    /// <summary>
    /// 是否收款
    /// </summary>
    [Required(ErrorMessage = "是否收款不能为空")]
    public override bool IsCollected { get; set; }

    /// <summary>
    /// 是否出报告
    /// </summary>
    [Required(ErrorMessage = "是否出报告不能为空")]
    public override bool IsReport { get; set; }

    /// <summary>
    /// 渠道对接
    /// </summary>
    public override long? SourceChanne { get; set; } = 0;

    /// <summary>
    /// 软删除
    /// </summary>
    [Required(ErrorMessage = "软删除不能为空")]
    public override bool IsDelete { get; set; }

}

/// <summary>
/// 客户档案表删除输入参数
/// </summary>
public class DeleteCustomerInput : BaseIdInput
{
}

/// <summary>
/// 客户档案表更新输入参数
/// </summary>
public class UpdateCustomerInput : CustomerBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long Id { get; set; }

}

/// <summary>
/// 客户档案表主键查询输入参数
/// </summary>
public class QueryByIdCustomerInput : DeleteCustomerInput
{

}
